%% test for recursively nested expressions to work correctly

-include_lib("ect/include/ect.hrl").


-module(recursive_expr).
-export([dotest/0]).
%-compile({parse_transform, treedumper}).

-import_class(pattern1).
-import_class(pattern2).


dotest() ->
    A = #pattern2{a = 2, b = 4},
    B = #pattern2{a = 5},
    X = A#pattern1{a = p, b = B#pattern1{a = a}},

%%    #pattern1{a = PP, b = #pattern1{a = AA}} = X,
%%    list_to_atom(atom_to_list(PP)++atom_to_list(AA)++"ss").
    list_to_atom(atom_to_list(X#pattern1.a)++atom_to_list((X#pattern1.b)#pattern1.a)++"ss").
